
<template>
  <div class="container">
    <model-selector />
    <div @click='confirm' class='confirm-btn'>开始做题</div>
  </div>
</template>
<script>
import ModelSelector from '@/components/ModelSelector/index.vue'
import { useRouter } from 'vue-router'
import { useStore } from 'vuex'
import loadData from '@/server/index.js'
export default {
  name: 'indexpage',
  components: {
    ModelSelector
  },
  setup() {
    const store = useStore()
    const router = useRouter()
    const confirm = () => {
      loadData(store)
      router.push('/test')
    }
    return {
      confirm
    }
  }
}
</script>
<style lang="less" scoped>
.container {
  padding: 20px;
}
.confirm-btn {
  height: 42px;
  background-color: #2e77bd;
  border-radius: 8px;
  line-height: 42px;
  font-size: 16px;
  color: #fff;
  text-align: center;
}
</style>
